import { createApp } from 'vue'
import App from './App.vue'
//导入UI
import ElementPlus from 'element-plus'
//导入路由
import router from './router/index.js'
//导入样式
import 'element-plus/dist/index.css'
//引入中文
import locale from 'element-plus/dist/locale/zh-cn.mjs'
//导入存储pinia
import { createPinia } from 'pinia'
//引入pinia持久化,避免刷新时丢失数据
//import piniaPluginPersist from 'pinia-plugin-persist';
import { createPersistedState } from 'pinia-persistedstate-plugin'
const app = createApp(App)
const pinia = createPinia();

//持久化缓存
//pinia.use(piniaPluginPersist);
const persist = createPersistedState();
pinia.use(persist)
app.use(pinia)
app.use(ElementPlus,{locale})
app.use(router)
app.mount('#app')
